<form name="search" method="post" action="<?=$curHost?>">
    <input type="hidden" name="frame" value="search" />
<? $cat_properties = getRecord('xteam_category','code="properties"');
    $list_properties = getArray('xteam_category', 'status=1 AND parent_id='.$cat_properties['id'],NULL,'sort,name');

    foreach ($list_properties as $list){?>
    <label for="<?=utf8_to_ascii($list['name'])?>" class="title-search"><?=$list['name']?></label>
    <div class="input">
        <select name="<?=utf8_to_ascii($list['name'])?>">
        	<option value="0">--- Chọn <?=$list['name']?> ---</option>
            <? $list_items = getArray('xteam_properties','parent_id='.$list['id'],NULL,'sort DESC, name ASC');
            foreach ($list_items as $item){?>
            <option value="<?=$item['id']?>" <?=$_REQUEST[utf8_to_ascii($list['name'])]==$item['id'] ? 'selected':''?>><?=$item['name']?></option>
            <? }?>
        </select>
        
    </div>
    <? }?>
    <input type="submit" name="search" value="Tìm kiếm" class="bottom-search" />
</form>